package com.framework.loippi.entity;

import com.framework.loippi.mybatis.eitity.GenericEntity;
import com.framework.loippi.mybatis.ext.annotation.Column;
import com.framework.loippi.mybatis.ext.annotation.Table;

import io.swagger.annotations.Api;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * Entity - 药品分类表
 * 
 * @author wmj
 * @version 2.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "T_MEDICINE_CATEGORY")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties({ "handler","hibernateLazyInitializer" }) 
@ApiModel(value="药品分类表",description="药品分类表")
public class Category implements GenericEntity {

	private static final long serialVersionUID = 5081846432919091193L;

	/** ID */
	@Column(id = true, name = "id", updatable = false)
	@ApiModelProperty(value = "ID")
	private Long id;
	
	/** 分类名称 */
	@Column(name = "name" )
	@ApiModelProperty(value = "分类名称")
	private String name;
	
	/** 类型ID */
	@Column(name = "type_id" )
	@ApiModelProperty(value = "类型ID")
	private Long typeId;
	
	/** 分类图片 */
	@Column(name = "image" )
	@ApiModelProperty(value = "分类图片")
	private String image;
	
	/** 父级ID（第一级父ID为0） */
	@Column(name = "parent_id" )
	@ApiModelProperty(value = "父级ID（第一级父ID为0）")
	private Long parentId;
	
	/** 分类描述 */
	@Column(name = "description" )
	@ApiModelProperty(value = "分类描述")
	private String description;
	
	/** 排序 */
	@Column(name = "sorts" )
	@ApiModelProperty(value = "排序")
	private Integer sorts;
	
	/** 状态(1启用2禁用) */
	@Column(name = "status" )
	@ApiModelProperty(value = "状态(1启用2禁用)")
	private Integer status;
	
	/**  */
	@Column(name = "create_time" )
	@ApiModelProperty(value = "")
	private java.util.Date createTime;
	
	/**  */
	@Column(name = "update_time" )
	@ApiModelProperty(value = "")
	private java.util.Date updateTime;

	/** 分级菜单 */
	@Column(name = "subList")
	@ApiModelProperty(value = "")
	private List<Category> subList;

	/** 关联药品 */
	@ApiModelProperty(value = "关联药品")
	private List<TMedicine> medicines;

}
